<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>对象拓展运算符</title>
</head>
<body>
	<script>
		// 1、拷贝对象
		let person1 = {name: "Amy", age: 15}
		let someone = { ...person1 }
		console.log(someone)  //{name: "Amy", age: 15}

		// 2、合并对象
		let gender = {gender: '男'}
		let address = {address: "青岛"}
		let person2 = {...gender, ...address}
		let person3={...person1,...person2}
		console.log(person3)  //{name: 'Amy', age: 15, gender: '男', address: '青岛'}


	</script>
</body>
</html>